home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ultra Pack
/
UltraComputing Technology Demos and Tools.iso
/
java
/
demo
/
lr
/
revo.wrl
< prev
next >
Wrap
Text File
|
1996-05-17
|
2KB
|
100 lines
#VRML V1.0 ascii
# revo.wrl -- Chris Laurel, 10-21-95
#
# This is a demonstration of the SurfaceOfRevolutionNode:
#
# SurfaceOfRevolution {
# profile [ ] # MFVec2f
# radialSubdivision -1 # SFLong
# close FALSE # SFBool
# }
#
# If radialSubdivison is -1, the number of slices to generate will be
# determined automatically.
# If close is TRUE, a segment from the last vertex to first vertex in
# the profile will be generated automatically.
# The same material is used for the whole object, regardless of the
# current material binding. A cylindrical projection is used to generate
# texture coordinates. No normals are generated if the current normal
# binding is OVERALL; if the binding is PER_FACE or PER_FACE_INDEXED, face
# normals are generated. Otherwise, vertex normals are generated using the
# current crease angle.
Separator {
DEF BackgroundColor Info { string "0.5 0.5 0.5" }
DEF Viewer Info { string "walk" }
DEF ViewerSpeed Info { string "3" }
PerspectiveCamera {
position 0 0 8
orientation 0 1 0 0
}
DirectionalLight { direction 1 0 0 }
Material {
ambientColor [ 0 0 0 ]
diffuseColor [ 0.1 0.5 0.2 ]
}
Separator {
Rotor { rotation 1 0 0 1 speed 0.3 }
Rotor { rotation 0 0 1 2 speed 0.4 }
# This object sets the radialSubdivision parameter so that is
# appears faceted rather than rounded
SurfaceOfRevolution {
radialSubdivision 6
profile [ 0 1, 1 0.5, 1 0.25, 0.8 0, 1 -0.25, 1 -0.5, 0 -1 ]
}
}
Translation { translation -3 0 0 }
Separator {
Rotor { rotation 1 0 0 0.5 speed 0.3 }
Rotor { rotation 0 0 1 0.5 speed 0.4 }
Material {
ambientColor [ 0 0 0 ]
diffuseColor [ 0.7 0.1 0.1 ]
}
SurfaceOfRevolution {
profile [ 0 0.5,
0.5 0.5,
0.5 1,
1 1,
0.9 0.81,
0.8 0.64,
0.7 0.49,
0.6 0.36,
0.5 0.25,
0.4 0.16,
0.3 0.09,
0.2 0.04,
0.1 0.01,
0 0 ]
}
}
Translation { translation 6 0 0 }
Separator {
Rotor { rotation 0 0 1 2.5 speed 0.5 }
Rotor { rotation 1 0 0 1.5 speed 0.2 }
Material {
ambientColor [ 0 0 0 ]
diffuseColor [ 0.2 0.7 0.8 ]
specularColor [1 1 1]
shininess 0.9
}
SurfaceOfRevolution {
profile [ 0.7 0.3, 1.3 0, 0.7 -0.3 ]
close TRUE
}
}
}